package eu.jk.performance.buffer;


public class BufferPoolSync<T> implements BufferPool<T> {

	BufferPool<T> bp=null;
	
	BufferPoolSync(int size) {
		bp=new BufferPoolNosync<T>(size);
	}

	@Override
	public synchronized void put(String key, T value) {
		bp.put(key, value);
	}

	@Override
	public synchronized T get(String key) {
		return bp.get(key);
	}

	@Override
	public synchronized T remove(String key) {
		return bp.remove(key);
	}

	@Override
	public synchronized boolean contains(String key) {
		return bp.contains(key);
	}

	@Override
	public synchronized int getFreeSize() {
		return bp.getFreeSize();
	}

	@Override
	public synchronized int getTotalSize() {
		return bp.getTotalSize();
	}

	@Override
	public synchronized int getUsedSize() {
		return bp.getUsedSize();
	}

	@Override
	public synchronized void resize(int size) {
		bp.getUsedSize();
	}

	@Override
	public synchronized void close() {
		bp.close();
	}

}
